package cn.itcast.service.impl;

import cn.itcast.dao.AccountDao;
import cn.itcast.domain.Account;
import cn.itcast.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/*
* @PackageName:cn.itcast.service.impl
* @Class:AccountServiceImpl
* @author:ledehui
* @Date:2020/11/2 16:38
*/
@Service("accountService")
public class AccountServiceImpl  implements AccountService{
@Autowired
private AccountDao accountDao;

    @Override
    public List<Account> findAll() {
        System.out.println("业务层：findAll");
        return accountDao.findAll();


    }

    @Override
    public void saveAccount(Account account) {
        System.out.println("业务层：saveAccount");
        accountDao.saveAccount(account);
    }
}
